package com.zhilianbao.leyaogo.ui.adapter.me;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.bql.recyclerview.swipe.SwipeMenuAdapter;
import com.zhilianbao.leyaogo.R;

import java.util.List;

/**
 * Created by liu on 2016/10/29.
 * 优惠券消息adapter
 */
public class CouponMesAdapter extends SwipeMenuAdapter<CouponMesAdapter.CouponMesViewHolder> {
    private List mList;
    private Context mContext;

    public CouponMesAdapter(Context context, List list) {
        mList = list;
        this.mContext = context;
    }

    @Override
    public View onCreateContentView(ViewGroup parent, int viewType) {
        return LayoutInflater.from(parent.getContext()).inflate(R.layout.item_coupon_mes, parent, false);
    }

    @Override
    public CouponMesViewHolder onCompatCreateViewHolder(View realContentView, int viewType) {
        return new CouponMesViewHolder(realContentView);
    }

    @Override
    public void onBindViewHolder(CouponMesViewHolder holder, int position) {
        holder.setData(mContext, position);

    }

    @Override
    public int getItemCount() {
        return 10;/*mList == null ? 0 : mList.size();*/
    }


    static class CouponMesViewHolder extends RecyclerView.ViewHolder {

        public CouponMesViewHolder(View itemView) {
            super(itemView);
        }

        public void setData(Context context, int position) {

        }
    }
}